.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 24, 2025
.Dt DEVELOPMENT 7
.Os
.Sh NAME
.Nm development
.Nd introduction to
.Fx
development process
.Sh DESCRIPTION
.Fx
development is split into three major subprojects: doc, ports, and src.
Doc is the documentation, such as the
.Fx
Handbook.
To read more, see:
.Pp
.Lk https://docs.FreeBSD.org/en/books/fdp-primer/
.Pp
Ports, described further in
.Xr ports 7 ,
are the way to build, package, and install third party software.
To read more, see:
.Pp
.Lk https://docs.FreeBSD.org/en/books/porters-handbook/
.Pp
The last one, src, revolves around the source code for the base system,
consisting of the kernel, and the libraries and utilities commonly called
the world.
.Pp
The Committer's Guide, describing topics relevant to all committers,
can be found at:
.Pp
.Lk https://docs.freebsd.org/en/articles/committers-guide/
.Pp
.Fx
src development takes place in the project-hosted
Git repository, located at:
.Pp
.Lk https://git.FreeBSD.org/src.git
.Pp
The push URL is:
.Pp
.Lk ssh://git@gitrepo.FreeBSD.org/src.git
.Pp
There is also a list of public, read-only Git mirrors at:
.Pp
.Lk https://docs.FreeBSD.org/en/books/handbook/mirrors/#external-mirrors
.Pp
The
.Ql main
Git branch represents CURRENT;
all changes are first committed to CURRENT and then usually
cherry-picked back to STABLE, which refers to Git branches such as
.Ql stable/14 .
Every few years a new STABLE is branched from CURRENT,
with an incremented major version number.
Releases are then branched off STABLE and numbered with consecutive
minor numbers such as
.Ql releng/14.3
.Pp
The layout of the source tree is described in its
.Pa README.md
file.
Build instructions can be found in
.Xr build 7
and
.Xr release 7 .
Kernel programming interfaces (KPIs) are documented in section 9
manual pages; use
.Ql apropos -s 9 \&.
for a list.
Regression test suite is described in
.Xr tests 7 .
For coding conventions, see
.Xr style 9 .
.Pp
To ask questions regarding development, use the mailing lists,
such as freebsd-arch@ and freebsd-hackers@:
.Pp
.Lk https://lists.FreeBSD.org
.Pp
To get your patches integrated into the main
.Fx
repository use Phabricator;
it is a code review tool that allows other developers to
review the changes, suggest improvements, and, eventually,
allows them to pick up the change and commit it:
.Pp
.Lk https://reviews.FreeBSD.org
.Pp
Or Github:
.Pp
.Lk https://github.com/freebsd
.Pp
To check the latest
.Fx
build and test status of CURRENT and STABLE branches,
the continuous integration system is at:
.Pp
.Lk https://ci.FreeBSD.org
.Sh FILES
.Bl -tag -compact -width "/usr/ports/devel/freebsd-git-devtools"
.It Pa /usr/src/CONTRIBUTING.md
.Fx
contribution guidelines
.It Pa /usr/src/tools/tools/git/git-arc.sh
Phabricator review tooling
.It Pa /usr/ports/devel/freebsd-git-devtools
Phabricator review tooling as a port
.El
.Sh EXAMPLES
Apply a patch from Github pull #1234, using
.Pa devel/gh :
.Pp
.Dl gh pr checkout 1234
.Pp
Apply a patch from Phabricator review D1234, using
.Xr git-arc 1 :
.Pp
.Dl git arc patch -c D1234
.Pp
Apply a manually downloaded
.Xr git-format-patch 1 ,
.Pa draft.patch ,
from Bugzilla or mail:
.Pp
.Dl git am draft.patch
.Pp
Apply a manually downloaded patch,
.Pa draft.diff ,
from Bugzilla or mail:
.Pp
.Dl git apply draft.diff
.Sh SEE ALSO
.Xr git 1 ,
.Xr git-arc 1 ,
.Xr witness 4 ,
.Xr build 7 ,
.Xr hier 7 ,
.Xr ports 7 ,
.Xr release 7 ,
.Xr tests 7 ,
.Xr locking 9 ,
.Xr style 9
.Sh HISTORY
The
.Nm
manual page was originally written by
.An Matthew Dillon Aq Mt dillon@FreeBSD.org
and first appeared in
.Fx 5.0 ,
December 2002.
It was since extensively modified by
.An Eitan Adler Aq Mt eadler@FreeBSD.org
to reflect the repository conversion from
.Lk https://www.nongnu.org/cvs/ CVS
to
.Lk https://subversion.apache.org/ Subversion .
It was rewritten from scratch by
.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
for
.Fx 12.0 .
